home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / amiganews / Anzeige_Browser / AWeb_APL_MOS / Install < prev    next >
Text File  |  2003-04-11  |  11KB  |  342 lines

  1. ; $VER: Install_AWeb_APL (15 March 2003)
  2. ; Description: Installer script for AWeb
  3.  
  4. (set cpu (database "cpu"))
  5. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  6. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  7.  
  8. (set awn (getversion "AWeb"))
  9. (set awv (/ awn 65536))
  10. (set awr (- awn (* awv 65536)))
  11.  
  12. ; all strings used in this installer script
  13. (set #need39 "This program requires MorphOS to function.")
  14. (set #needcpu "You should not see this text.  If you do, something went horribly wrong.")
  15. (set #nohelp "No help available.")
  16. (set #welcome
  17.    (cat "\n\nAWeb APL is a fast, multithreaded WWW browser for AmigaOS and MorphOS."
  18.         "AWeb APL runs with a wide variety of TCP-stacks, including Genesis and Miami."
  19.         "Note: You may need to change your default drawer icon to an old non-PNG type icon for installer to work correctly under MorphOS (v. 1.3)\n"
  20.         "\n---This is the MorphOS only version.---\n"
  21.         "---MorphOS Version by: Mark Olsen---\n\n"
  22.       ("\nThis installation procedure will install the AWeb-APL browser version %ld.%ld on your system.\n" awv awr)
  23.    )
  24. )
  25. (set #classact
  26.    (cat "IMPORTANT\n\n"
  27.         "This AWeb APL needs the ClassAct GUI package or ReAction to run.\n"
  28.         "Since ReAction is not available for MorphOS, you must have installed ClassAct to use AWeb. "
  29.         "Further, you may need the additional AWeb classes currently only available from AmiTrix.\n"
  30.         "\nIf you have OpenURL installed and configured with another browser, you are given a choice"
  31.         " of whether or not to download these file from this installer."
  32.    )
  33. )
  34.  
  35. (set #destdir-prompt "Please select the directory where you want AWeb APL installed.\n(If you do not accept the default, a directory 'AWeb' will be created there.)")
  36. (set #destdir-help "A directory for AWeb will be created here. By accepting the default directory, most of the files don't have to be copied.")
  37. (set #installing "Installing ")
  38. (set #languages-prompt "Please select which language catalog(s) you want to install")
  39. (set #fonts-prompt "Do you want to install the \"times.font\" and \"courier.font\" sizes 30 and 36?")
  40. (set #fonts-help 
  41.    (cat "In order to provide AWeb with a consistent set of fonts, four fonts are included "
  42.         "in this archive, times/30, times/36, courier/30 and courier/36.\n\n"
  43.         "Because AWeb uses these fonts by default, page headers might look really awful "
  44.         " if you don't install these fonts. It is highly recommended that you install them."
  45.         " Further, you may need to locate and install courier.font and helvetica.font for AWeb to work correctly."
  46.    )   
  47. )
  48. (set #fixfonts-prompt "The FixFonts utility will be run to make the newly added fonts available.")
  49. (set #fixfonts-help
  50.    (cat "The FixFonts utility is needed to make the newly added fonts available to the system.\n\n"
  51.       "If you intend to use the fonts from this archive, you are strongly encouraged to "
  52.       "run FixFonts now.\n\n"
  53.       "Note that running this program may take a while."
  54.    )
  55. )
  56.  
  57. (set #readme "Displaying the version notes readme...")
  58. (set #makeasgn "Making AWeb_APL assignment to S:User-Startup")
  59. (set #bye 
  60.    (cat "In case you need help configuring or using AWeb APL, pressing the HELP key "
  61.         "when AWeb is active will bring up the documentation.\n\n\n"
  62.         "Please check the _Plugins_  drawer included in this archive for setting up the PNG decoder."
  63.    )
  64. )
  65. (set #image "Close image with close gadget whenever you get tired of looking at it...")
  66. (set #ca_help 
  67.    (cat "\n\nTo use this feature, you must have the third party library, OpenURL, installed on your system."
  68.         "The installer will try to launch your default OpenURL browser to download the appropriate files, "
  69.         "or take you to the correct instructional webpage.\n\n"
  70.         "Once a download is complete, you can continue with the next download or page-link. Afterwards, "
  71.         "install the packages as directed by their installers, and continue with AWeb installation."
  72.         "\n\n==========\n\n"
  73.         "If you do not have OpenURL installed, or already have ClassAct installed, you may skip this step."
  74.    )
  75. )
  76. (set #ca_url "http://us.aminet.net/dev/gui/ClassAct2Demo.lha")
  77. (set #ca_upd "http://www.amitrix.com/Files/classact33.lha")
  78. (set #ca_inst "http://www.amitrix.com/aweb.html")
  79. (set #ca_1 "\n\nUse OpenURL to fetch the ClassAct Demo from Aminet?  (http://us.aminet.net/dev/gui/ClassAct2Demo.lha)")
  80. (set #ca_2 "\n\nUse OpenURL to fetch the ClassAct Update for Aweb3?  (http://www.amitrix.com/Files/classact33.lha)")
  81. (set #ca_3 "\n\nWould you like to use OpenURL to view the page for installing the ClassAct update?")
  82. (set #ca_done "\n\n\nIf you chose to install ClassAct, click PROCEED when finished.")
  83. ; ---------------------------------------------------------------------------
  84. (complete 0)
  85. (if (not v39)
  86.    (abort #need39)
  87. )
  88. (message #welcome)
  89. (run "run >NIL: SYS:Utilities/MultiView Docs/AWeb.iff" (prompt #image)(safe))
  90. (message #image)
  91. (set @source-dir (pathonly @icon))
  92. (set defdir
  93.    (askdir
  94.       (prompt #destdir-prompt)
  95.       (help #destdir-help)
  96.       (default @source-dir)
  97.    )
  98. )
  99. (set @default-dest defdir)
  100. (set nocopy (= @source-dir @default-dest))
  101. ;--- Start ClassAct ---;
  102. (message #classact)
  103. (set #get_ca
  104.     (askbool
  105.         (prompt #ca_1)
  106.         (help #ca_help)
  107.         (choices
  108.  
  109.             "Yes"
  110.             "No"
  111.         )
  112.         (default 1)
  113.     )
  114. )
  115. (if (= #get_ca 1)
  116.     (
  117.        (set #get (cat "run >NIL: OpenURL " #ca_url))
  118.        (run #get (safe))
  119.     )
  120. )
  121. (set #get_upd
  122.     (askbool
  123.         (prompt #ca_2)
  124.         (help #ca_help)
  125.         (choices
  126.  
  127.             "Yes"
  128.             "No"
  129.         )
  130.         (default 1)
  131.     )
  132. )
  133. (if (= #get_upd 1)
  134.     (
  135.        (set #get (cat "run >NIL: OpenURL " #ca_upd))
  136.        (run #get (safe))
  137.     )
  138. )
  139. (set #get_page
  140.     (askbool
  141.         (prompt #ca_3)
  142.         (help #ca_help)
  143.         (choices
  144.  
  145.             "Yes"
  146.             "No"
  147.         )
  148.         (default 1)
  149.     )
  150. )
  151. (if (= #get_page 1)
  152.     (
  153.        (set #get (cat "run >NIL: OpenURL " #ca_inst))
  154.        (run #get (safe))
  155.     )
  156. )
  157. (message #ca_done)
  158.  
  159. ;--- End ClassAct ---;
  160. (if (not nocopy)
  161.     (
  162.     (set @default-dest (tackon @default-dest "AWeb_APL"))
  163.     
  164.        (set update-aweb (exists @default-dest))
  165.     
  166.     (if (not update-aweb)
  167.         (makedir @default-dest 
  168.             (prompt #creating-dir @default-dest) 
  169.                (infos)
  170.         )
  171.        )
  172.       (complete 10)
  173.  
  174.       (copyfiles
  175.          (source "")
  176.          (dest @default-dest)
  177.          (choices "AWeb" "AWebCfg" "AWebJS")
  178.          (prompt #installing "AWeb")
  179.          (infos)
  180.       )
  181.       (complete 20)
  182.     (copyfiles
  183.      (source "")
  184.      (dest @default-dest)
  185.      (choices "Storage")
  186.      (prompt #installing "AWeb")
  187.      (infos)
  188.     )
  189.     (complete 25)
  190.     (copyfiles
  191.          (source "")
  192.           (dest @default-dest)
  193.          (choices "aweblib")
  194.           (prompt #installing "AWeb")
  195.     )
  196.       (complete 30)
  197.  
  198.       (set cache-dir (tackon @default-dest "Cache"))
  199.       (if (not (exists cache-dir))
  200.          (
  201.             (makedir cache-dir
  202.                (prompt #creating-dir cache-dir)
  203.                (infos)
  204.             )
  205.          )
  206.       )
  207.       (complete 40)
  208.  
  209.     (copyfiles
  210.          (source "")
  211.           (dest @default-dest)
  212.          (choices "ReadMe" "Docs" "Icons" "Images" "Install_Animation" "Install_Buttons")
  213.           (prompt #installing "AWeb")
  214.           (infos)
  215.     )
  216.     (makedir (tackon @default-dest "awebplugin"))
  217.     (copyfiles
  218.         (source "Plugins")
  219.         (dest (tackon @default-dest "awebplugin"))
  220.         (pattern "#?.awebplugin")
  221.         (optional "nofail" "force" "askuser")
  222.     )
  223.  
  224.  
  225.       (complete 50)
  226.       
  227.       (set languages
  228.          (askoptions
  229.             (choices "English" "ÃeÓtina (Czech)" "Dansk" "Deutsch" "Español"
  230.                "Français" "Greek" "Íslenska" "Italiano" "Nederlands" "Norsk"
  231.                "Polski" "Português" "Russian" "Srpski" "Suomi" "Svenska" "Türkçe")
  232.             (prompt #languages-prompt)
  233.             (help @askoptions-help)
  234.             (default 1)
  235.          )
  236.       )
  237.  
  238.       ; If any language calalogs are selected, copy them.
  239.  
  240.       (if (bitand languages 65534)
  241.          (
  242.             (set catdir (tackon @default-dest "Catalogs"))
  243.             (if (not (exists catdir))
  244.                (makedir catdir
  245.                   (prompt #creating-dir catdir)
  246.                     (infos)
  247.                )
  248.             )
  249.             (set bit 2)    ; English implementation, so there is no catalog for it
  250.             (set langnr 1)
  251.             (while (< langnr 18)
  252.                (if (bitand languages bit)
  253.                   (
  254.                      (set lang
  255.                         ; English is never selected from this list
  256.                         (select langnr "English" "ÃeÓtina" "Dansk" "Deutsch" "Español"
  257.                            "Français" "Greek" "Íslenska" "Italiano" "Nederlands" "Norsk"
  258.                            "Polski" "Português" "Russian" "Srpski" "Suomi" "Svenska" "Türkçe"
  259.                         )
  260.                      )
  261.                      (copyfiles
  262.                         (source (tackon "Catalogs" lang))
  263.                         (choices "aweb.catalog" "awebcfg.catalog")
  264.                         (dest (tackon catdir lang))
  265.                      )
  266.                   )
  267.                )
  268.                (set bit (shiftleft bit 1))
  269.                (set langnr (+ langnr 1))
  270.             )
  271.          )
  272.       )
  273.     )
  274. )
  275.  
  276. (complete 60)
  277.  
  278. ; Only ask if fonts should be installed in expert mode
  279. (if
  280.    (< @user-level 2)
  281.    (set #fonts 1)
  282.    (set #fonts
  283.       (askbool
  284.          (prompt #fonts-prompt)
  285.          (help #fonts-help)
  286.          (choices "Yes" "No")
  287.          (default 1)
  288.       )
  289.    )
  290. )
  291. (if
  292.    (> #fonts 0)
  293.    (
  294.       (copyfiles
  295.          (source "Fonts")
  296.          (dest "Fonts:")
  297.          (choices "times" "courier")
  298.          (prompt #installing "fonts")
  299.       )
  300.       (run "SYS:System/FixFonts"
  301.          (confirm)
  302.          (prompt #fixfonts-prompt)
  303.          (help #fixfonts-help)
  304.       )
  305.    )
  306. )
  307.  
  308. (complete 80)
  309.  
  310. (set #ss_command
  311.    (cat
  312.           "Assign AWEB_APL: "
  313.           '"'
  314.           @default-dest
  315.           '"'
  316.    )
  317. )
  318.  
  319. (startup "AWEB_APL"
  320.  
  321.     (prompt #makeasgn)
  322.  
  323.     (help @startup-help)
  324.  
  325.     (command
  326.  
  327.         (#ss_command)
  328.     )
  329. )
  330.  
  331. (run "run >NIL: " | #ss_command)
  332.  
  333. (makedir "ENVARC:AWeb_APL")
  334.  
  335. (complete 90)
  336.  
  337. (complete 100)
  338. (run "run >NIL: SYS:Utilities/MultiView ReadMe" (prompt #readme))
  339. (run "run >NIL: SYS:Utilities/MultiView plugins.txt" (prompt #readme))
  340.  
  341. (exit #bye)
  342.